/*
 * FNISVGEditor - JavaScript - based editor for SVG graphics 
 * Copyright (C) 2008 - 2009 Antti Leppä / Foyt
 * http://www.foyt.fi
 * 
 * License: 
 * 
 * Licensed under GNU Lesser General Public License Version 2.1 or later (the "LGPL") 
 * http://www.gnu.org/licenses/lgpl.html
 */

FNISVGEditorStyleManager = Class.create({
  initialize: function(){
    this.setFillColor('none');
    this.setFillOpacity(0);
    this.setStrokeOpacity(1);
    this.setStrokeWidth(1);
    this.setStrokeColor('#000000');
    this.setStrokeDashArray("none");
  },
  getFillColor: function(){
    return this.fillColor;
  },
  setFillColor: function(fillColor){
    this.fillColor = fillColor;
  },  
  getFillOpacity: function(){
    return this.fillOpacity;
  },
  setFillOpacity: function(fillOpacity){
    this.fillOpacity = fillOpacity;
  },  
  getStrokeColor: function(){
    return this.strokeColor;
  },
  setStrokeColor: function(strokeColor){
    this.strokeColor = strokeColor;
  },  
  getStrokeWidth: function(){
    return this.strokeWidth;
  },
  setStrokeWidth: function(strokeWidth){
    this.strokeWidth = strokeWidth;
  },  
  getStrokeOpacity: function(){
    return this.strokeOpacity;
  },
  setStrokeOpacity: function(strokeOpacity){
    this.strokeOpacity = strokeOpacity;
  },
  setStrokeDashArray: function (strokeDashArray) {
	this._strokeDashArray = strokeDashArray;
  },
  getStrokeDashArray: function () {
    return this._strokeDashArray;
  },
  asString: function(){
    var fc = this.getFillColor();
    var fo = this.getFillOpacity();
    var sc = this.getStrokeColor();
    var sw = this.getStrokeWidth();
    var so = this.getStrokeOpacity();
    return 'fill:' + fc + ';fill-opacity:' + fo + ';stroke:' + sc + ';stroke-width:' + sw + ';stroke-opacity:' + so + ';stroke-dasharray:' + this._strokeDashArray;
  }
});